extends Node2D

#@export_file("*.tscn") var newlevel: String = "res://5_场景之间/sc_5_2.tscn"
@export var newlevel: PackedScene
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
	if Input.is_action_just_pressed("跳跃"):
		var tree = get_tree()
		tree.change_scene_to_packed(newlevel)
	if Input.is_action_just_pressed("左"):
		var node = newlevel.instantiate()
		node.name = "NewNode"
		get_tree().root.add_child(node)
	pass
